<!-- BlogPost.vue -->
<script>
export default {
    emits: ['enlarge-text'],
    props: { title: String },
  
    setup(props, ctx) {
        ctx.emit('enlarge-text')
    }
}
</script>

<!-- BlogPost.vue, 省略了 <script> -->
<template>
    <div class="blog-post">
        <h4>{{ title }}</h4>
        <button @click="$emit('enlarge-text')">Enlarge text</button>
    </div>
</template>